package com.snake.springboot.custom.service.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * <p>配置属性
 * 类 {@code Properties}  <br> .
 * 创建时间：2024/11/28 18:13
 *
 * @author yxt
 * @see
 */
@Configuration
public class Properties {

    public static final Long fileTimeOut=50L;
    /**上传路径*/
    public static final String localUploadFile="/resource/file/uploadFile";
    /**删除文件*/
    public static final String localDelFiles="/resource/file/delFiles";
    /**文件最大大小*/
    public static Integer MAX_FILE_SIZE;


    public static String fileDir;
    public static String xOssProcess="x-oss-process=video/snapshot,t_1000,m_fast";

    @Value("${file.oss.dir:/fileoss/localOss/%s/%s/%s/%s/%s}")
    public void setFileDir(String fileDir) {
        Properties.fileDir = fileDir;
    }

    @Value("${file.oss.maxFileSize:500}")
    public void setMaxFileSize(Integer maxSize) {
        Properties.MAX_FILE_SIZE = maxSize * 1024 * 1024;
    }
}
